diff options
Diffstat (limited to 'examples/docs/src/pages/[...slug].astro')
-rw-r--r-- | examples/docs/src/pages/[...slug].astro | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/examples/docs/src/pages/[...slug].astro b/examples/docs/src/pages/[...slug].astro deleted file mode 100644 index a59e4bc2a..000000000 --- a/examples/docs/src/pages/[...slug].astro +++ /dev/null @@ -1,22 +0,0 @@ ---- -import { CollectionEntry, getCollection } from 'astro:content'; -import MainLayout from '../layouts/MainLayout.astro'; - -export async function getStaticPaths() { - const docs = await getCollection('docs'); - return docs.map((entry) => ({ - params: { - slug: entry.slug, - }, - props: entry, - })); -} -type Props = CollectionEntry<'docs'>; - -const post = Astro.props; -const { Content, headings } = await post.render(); ---- - -<MainLayout headings={headings} {...post.data}> - <Content /> -</MainLayout> |